<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script
	src="${pageContext.request.contextPath}/resources/js/Request/Request.js"></script>
<div id="content" class="span10">
	<!-- content starts -->

	<div>
		<ul class="breadcrumb">
			<li><a href="#">Home</a> <span class="divider">/</span></li>
			<li><a href="#">Pending Requests</a></li>
		</ul>
	</div>

	<div class="row-fluid sortable">
		<div class="box span12">
			<div class="box-header well" data-original-title>
				<h2>
					<i class="icon-eye-open"></i> Pending Requests
				</h2>
				<div class="box-icon">
					<a href="#" class="btn btn-minimize btn-round"><i
						class="icon-chevron-up"></i></a>
				</div>
			</div>
			<div class="box-content">
				<table class="table table-condensed">
					<thead>
						<tr>
							<th style="width: 80%;">Join Request List</th>
							<th>Actions</th>
						</tr>
					</thead>
					<tbody>
						<c:choose>
							<c:when test="${not empty joinRequests}">
								<c:forEach items="${joinRequests}" var="joinRequest">
									<tr class="well">
										<td><strong style="color: #0088cc;">${joinRequest.emp.email}</strong>
											Requests to join <strong style="color: #0088cc;">${joinRequest.owner.company.companyName}</strong>
										</td>
										<td><a id="acc"
											href="acceptRequests?id=${joinRequest.id}&empId=${joinRequest.emp.id}"
											class="btn btn-success btn-small"><i
												class="icon-white icon-ok-sign"></i> Accept</a> <a id="imp"
											href="refuseRequests?id=${joinRequest.id}"
											class="btn btn-danger btn-small"><i
												class="icon-white icon-exclamation-sign"></i> Ignore</a></td>
									</tr>
								</c:forEach>
							</c:when>
							<c:otherwise>
								<tr class="well">
									<td>
										<div>
											<strong class="text-center">There's no Requests</strong>
										</div>
									</td>
									<td></td>
								</tr>
							</c:otherwise>
						</c:choose>
					</tbody>
				</table>
			</div>
		</div>
		<!--/span-->

	</div>
	<!--/row-->


	<!-- content ends -->
</div>
<!--/#content.span10-->